xen: sched: fix per-socket runqueue creation in credit2
authorDario Faggioli <dario.faggioli@citrix.com>
Tue, 29 Sep 2015 12:04:55 +0000 (14:04 +0200)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 8 Apr 2016 15:01:59 +0000 (16:01 +0100)
commit58f4e2d4eff3444b5db5a98caada7abe92d3f1e4
tree5371fba3693caf8bfb363a7ff51fa93042e72a57
parent2c6f317a2bc34cd06d00af39d40fd31fb9d52863
xen: sched: fix per-socket runqueue creation in credit2

The credit2 scheduler tries to setup runqueues in such
a way that there is one of them per each socket. However,
that does not work. The issue is described in bug #36
"credit2 only uses one runqueue instead of one runq per
socket" (http://bugs.xenproject.org/xen/bug/36), and a
solution has been attempted by an old patch series:

 http://lists.xen.org/archives/html/xen-devel/2014-08/msg02168.html

Here, we take advantage of the fact that now initialization
happens (for all schedulers) during CPU_STARTING, so we
have all the topology information available when necessary.

This is true for all the pCPUs _except_ the boot CPU. That
is not an issue, though. In fact, no runqueue exists yet
when the boot CPU is initialized, so we can just create
one and put the boot CPU in there.

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@citrix.com>
xen/common/sched_credit2.c